
// <copyright file="PerfCounterAttribute.cs" company="Subhadra Software Solutions">
//   
// </copyright>
// <summary>
//   The perf counter attribute.
// </summary>

namespace SubhadraSolutions.Sharp.Utils.Diagnostics.Performance
{
    using System;
    using System.Diagnostics;

    /// <summary>
    /// The perf counter attribute.
    /// </summary>
    [AttributeUsage(AttributeTargets.Property, AllowMultiple = false, Inherited = true)]
    public sealed class PerfCounterAttribute : Attribute
    {
        #region Constructors and Finalizers

        /// <summary>
        /// Initializes a new instance of the <see cref="PerfCounterAttribute"/> class.
        /// </summary>
        public PerfCounterAttribute()
        {
            this.CounterType = PerformanceCounterType.NumberOfItems64;
            this.SizeType = SizeTypes.None;
            this.CounterSizeTypes = SizeTypes.None;
            this.CounterTimeTypes = TimeTypes.None;
        }

        #endregion Constructors and Finalizers

        #region Public Properties

        /// <summary>
        /// Gets or sets the counter size types.
        /// </summary>
        public SizeTypes CounterSizeTypes { get; set; }

        /// <summary>
        /// Gets or sets the counter time types.
        /// </summary>
        public TimeTypes CounterTimeTypes { get; set; }

        /// <summary>
        /// Gets the counter type.
        /// </summary>
        public PerformanceCounterType CounterType { get; private set; }

        /// <summary>
        /// Gets or sets the group name.
        /// </summary>
        public string GroupName { get; set; }

        /// <summary>
        /// Gets or sets the size type.
        /// </summary>
        public SizeTypes SizeType { get; set; }

        #endregion Public Properties
    }
}
